package kr.totalcall.controls
{
	import flash.display.Sprite;
	import flash.events.MouseEvent;
	
	import mx.controls.DataGrid;

	public class DataGridEx extends DataGrid
	{
		public var rowColorFunction:Function;

		public function DataGridEx()
		{
			super();
			drawFocus(false);
		}
		
		override protected function drawRowBackground(s:Sprite, rowIndex:int, y:Number, height:Number, color:uint, dataIndex:int):void
		{
			if(rowColorFunction != null && dataProvider != null)
			{
				color = rowColorFunction(dataIndex, color);
			}

			super.drawRowBackground(s, rowIndex, y, height, color, dataIndex);
		} 
	}
}